package com.lap.framework.generator.domain.valueobject;

import java.util.Objects;

public record TypeModel(JavaType javaType, String min, String max) {

  public TypeModel {
    Objects.requireNonNull(javaType, "javaType cannot be null");
  }

  public static TypeModel of(String javaType, String min, String max) {
    return new TypeModel(JavaType.createNew(javaType), min, max);
  }
}
